home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
fortran
/
fv121s.zip
/
FAT3.DOC
< prev
next >
Wrap
Text File
|
1988-06-04
|
29KB
|
1,053 lines
APR 1988 FAT-VIDEO 1.21 GETMON Page V-32
GETMON(NRS,NCS,NRE,NCE,SEG) - Copy a screen window to memory at SEG.
Usage:
call getmon(nrs,ncs,nre,nce,seg)
integer*2 nrs,ncs
integer*2 nre,nce
integer*2 seg or integer*4 seg
inputs: nrs,ncs,nre,nce,seg
returns: none
MS-Fortran 4.0 Large Model
Description:
This subroutine stores the window section defined by nrs,ncs
and nre,nce on the screen into the buffer starting at seg. It is
up to the calling program to allocate storage via ALLMEM().
This routine stores the monochrome buffers character and
attribute bytes for the window defined, to memory at SEG.
This routine reads directly from the monochrome video buffer,
and may cause software incompatabilities.
This function does not clear the window after saving it, but
once saved you may do anything to the window area, and restore
the saved window contents using PUTMON().
See also getvid(), putvid(),getcga(),putcga().
nrs = first row of window
ncs = first col of window
nre = last row of window
nce = last col of window
seg = segment of allocated memory, as output from ALLMEM().
Note: To calcualte the number of paragraphs to request from ALLMEM()
calculate the following:
Npar= (((nr*nc)*2)+15)/16 ; nr=nre-nrs+1, nc=nce=ncs+1
Example:
Npar= (((11*41)*2)+15)/16
call ALLMEM(Npar,SEG,MaxPar)
if(SEG.eq.7 .or. SEG.eq.8)Go To 1000 ;Error !
call GETMON(0,0,10,40,SEG)
See Wopen(),Wclose().
Restrictions: 80 column mode only !
Int none
Mono, EGA
APR 1988 FAT-VIDEO 1.21 PUTMON Page V-33
PUTMON(NRS,NCS,NRE,NCE,SEG) - Copy a window in memory at SEG to
the screen.
Usage:
call putmon(nrs,ncs,nre,nce,seg)
integer*2 nrs,ncs
integer*2 nre,nce
integer*2 seg or integer*4 seg
inputs: nrs,ncs,nre,nce,seg
returns: none
MS-Fortran 4.0 Large Model
Description:
This subroutine restores the window section defined by nrs,ncs
and nre,nce onto the screen. It is up to the calling program to
free storage via FREMEM().
This routine restores the monochrome buffers character and
attribute bytes for the window defined.
This routine writes directly to the mono video memory buffer.
See also getvid(), putvid(),getcga(),putcga().
nrs = first row of window
ncs = first col of window
nre = last row of window
nce = last col of window
Seg = segment address used in GETMON()
Example:
call PUTMON(0,0,10,40,seg)
call FREMEM(Seg,Ier)
if(Ier.ne.0)Go To 1000 ; Error !
See Wopen(),Wclose().
Restrictions: 80 column mode only !
Int none
Mono, EGA
APR 1988 FAT-VIDEO 1.21 CLS Page V-34
CLS() - Clear the Screen.
Usage:
call cls()
MS-Fortran 4.0 Large Model
Description:
This subroutine scrolls the entire window up, effectively
clearing the screen.
This function determines the active page, gets the attribute
byte at the cursor, and then scrolls the window, filling the
blank lines with the color defined by the attribute bytes
background color.
See also scwup(), scwdn().
Int 10h, fx-0Fh, 08h, 06h
CGA,Mono
APR 1988 FAT-VIDEO 1.21 RDKBD Page V-35
RDKBD(SCAN,KEY) - Read the keyboard.
Usage:
call rdkbd(SCAN,KEY)
integer*2 scan,key
inputs: none
returns: scan,key
MS-Fortran 4.0 Large Model
Description:
This subroutine returns the ascii code from the keyboard and
its scan code. This function doesn't echo the character read from
the keyboard.
If key is returned as zero then a special key was hit such as
the function keys(F1,F2,..) or the cursor keys, or a combination
of shift,ctrl,alt and a function key. The value
of the special key is returned in the scan variable.
If a normal key is struck then key returns the ascii code.
Once read by rdkbd() a character is removed from the keyboard
buffer. This function cannot be interrupted by a ctrl-c keypress.
See chinp() to allow ctrl-c interrupts during a keyboard read.
See also chinp(), kbdst(), kbdfl().
scan = scan code if ascii, key code if special key
key= ascii code or 0 for special key code
Int 16, fx-00h
CGA, Mono, EGA
APR 1988 FAT-VIDEO 1.21 KBDST Page V-36
KBDST(SCAN,ACHAR) - Get the keyboard status.
Usage:
call kbdst(SCAN,ACHAR)
integer*2 scan,key
inputs: none
returns: scan,key
MS-Fortran 4.0 Large Model
Description:
This subroutine reports whether a character is is ready at
the keyboard. If there are no characters ready then scan and
key are zero. If an ascii character is ready, it is returned in
key. If a special key is present, then key is zero and scan
contains the key code.
This function does not remove characters from the keyboard
buffer though, as rdkbd() does.
The keyboard buffer may be cleared by calling this function,
and if a character is ready, reading it with rdkbd(), and
doing this until no characters are found.
See also rdkbd(), kbdfl(), chinp().
scan = scan code if ascii, key code if special key
key= ascii code or 0 for special key code
Int 16h, fx- 02h
CGA, Mono, EGA
APR 1988 FAT-VIDEO 1.21 KBDFL Page V-37
KBDFL(FLAGS) - Get the keyboard flags.
Usage:
call kbdfl(Flags)
integer*2 Flags
inputs: none
returns: flags
MS-Fortran 4.0 Large Model
Description:
This subroutine returns the keyboard flags byte. The flags
indicate which special keys are pressed, such as left-shift,
right-shift, insert, scroll lock, num lock, and ctrl.
This is not a generally useful function from Fortran,
especially with the other keyboard reads available, since
they can read any key combination. There are some uses for this,
if you are clever.
See also rdkbd(), kbdst(), chinp().
Flag = the low byte of flag has each bit set as defined below.
Bit Set Meaning Dec Value
7 Insert on 128
6 Caps on 64
5 Num Lock on 32
4 Scroll Lock on 16
3 Alt key down 8
2 Ctrl key down 4
1 Left-Shift down 2
0 Right-Shift down 1
Int 16h, fx-02
CGA, Mono, EGA
APR 1988 FAT-VIDEO 1.21 CHINP Page V-38
CHINP(KEY) - Get character from keyboard, no echo.
Usage:
call chinp(key)
integer*2 key
inputs: none
returns: key
MS-Fortran 4.0 Large Model Dos2.0
Description:
This program reads a character from t